package org.bookie.model.services;

import java.util.List;

import org.bookie.model.Period;
import org.bookie.model.Transaction;
import org.bookie.model.User;
import org.bookie.model.services.impl.GenericDAO;

public interface TransactionDAO extends GenericDAO<Transaction, Long> {
	/**
	 * Finds {@link Transaction}s belonging to the specified {@link User}
	 * over given period of time. The transactions are sorted sorted by date in descending order.
	 * @param user user to find transactions of
	 * @param period period to search for transactions
	 * @return
	 */
	public List<Transaction> findByUser(User user, Period period);
	
	public List<Transaction> findByUser(User user, boolean asc);
	public List<Transaction> findByUserId(Long id, boolean asc);
}
